<?php
namespace Admin\Model;
use Think\Model\RelationModel;
class AdminModel extends RelationModel {
     protected $_link = array(
       'group_access'=>array(
        'mapping_type'  => self::MANY_TO_MANY,//必填项 确定关联表之间的关系
         'class_name'    => 'group',//必填项 要关联的表名（副表）
        'foreign_key'   => 'uid',//必填项 指向中间表中主表的字段外键
        'relation_foreign_key' =>'group_id', //必填项 指向中间表中副表的字段外键
        'relation_table' =>'my_group_access' //多对多中间表 中间表主要加前缀
         ),
       );

}
